#pragma once

#include <QtWidgets/QWidget>
#include "ui_debugTcp.h"
#include <QTcpSocket>
#include <qevent.h>

class debugTcp : public QWidget
{
    Q_OBJECT

public:
    debugTcp(QWidget *parent = nullptr);
    ~debugTcp();
private slots:
    void on_connectBtn_clicked();
    void on_writeBtn_clicked();
    void on_disBtn_clicked();
    void connectYes();
    void connectDis();
    void connectError();
private:
    void initClient();
private:
    Ui::debugTcpClass ui;
    QTcpSocket* client;
protected:
    void closeEvent(QCloseEvent* event);
};
